package net.xiduth.game.player.dialogues.auto;

import net.xiduth.game.Graphics;
import net.xiduth.game.minigames.clanwars.FfaZone;
import net.xiduth.game.minigames.clanwars.FunZone;
import net.xiduth.game.player.controlers.Wilderness;
import net.xiduth.game.player.dialogues.Dialogue;

public class NpcItem extends Dialogue {
	
	@Override
	public void start() {
		if(player.getControlerManager().getControler() instanceof Wilderness || player.getControlerManager().getControler() instanceof FfaZone || player.getControlerManager().getControler() instanceof FunZone){
	player.getDialogueManager().startDialogue("You can't use this right now.");
		return;
		}else{
		sendOptionsDialogue("Select an Option", "Npc Transformation","Change back to a normal player" ,"Never mind.");
		stage = 0; //u forgot to add? ^
		}
	}

	@Override
	public void run(int interfaceId, int option) {
		switch(stage) {
		case -1:
			sendOptionsDialogue("Select an Option", "Npc Transformation","Change back to a normal player" ,"Never mind.");
			stage = 0;
			break;
		case 12:
			end();
			player.getInterfaceManager().closeChatBoxInterface();
			break;
		case 0:
			switch(option) {
			case OPTION_1:
				player.getAppearence().transformIntoNPC(8575);
				stage = 12;
				break;
			case OPTION_2:
				player.getAppearence().transformIntoNPC(-1);
				player.setNextGraphics(new Graphics(
						1999, 0, 0));
				stage = 12;
				break;
			case OPTION_3:
				
				stage = 12;
				break;
			}
		}
	}

	@Override
	public void finish() {
		// TODO Auto-generated method stub
		
	}

}
